#!/usr/bin/env python
# coding=utf-8
"""
# @Created on : 2016/05/01 15:08
# @Author     : ldf (ldf@eehello.com)
# @Link       : http://www.eehello.com
# @Version    : 
# 本程序在python2.7下测试通过
"""

import MySQLdb

def jilu(toke001,time001,data001,name001):

    conn = MySQLdb.connect(host='10.41.4.230',user='root',passwd='12345',db='day5_zuoye',port=3306,charset='utf8')
    cur = conn.cursor()

    sql_cmd = 'insert into talk_jl (toke,time,data,name) values (%s,%s,%s,%s) '
    #print sql_cmd

    cur.execute(sql_cmd,(toke001,time001,data001,name001,))
    conn.commit()

    cur.close()
    conn.close()

#data = '你好啊'
#jilu(121220.12564,'2016-05-01 17:00:00',data,'server')